import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

//键盘监视器
/*public class KeyMonitor extends KeyAdapter {
    int a=1;
    //按下键盘
    @Override
    public void keyPressed(KeyEvent e){
        //返回键值
        System.out.println(e.getKeyChar());
        int key=e.getKeyCode();
        switch (key){
            case KeyEvent.VK_1:
                break;
            case KeyEvent.VK_2:
                break;
            case KeyEvent.VK_ENTER:
                break;
        }
    }
}*/
